import 'dart:convert';

import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/basic_department_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/basic_department_entity.g.dart';

@JsonSerializable()
class BasicDepartmentEntity {
	BasicDepartmentEntity();

	factory BasicDepartmentEntity.fromJson(Map<String, dynamic> json) => $BasicDepartmentEntityFromJson(json);
	late List<BasicDepartmentEntity> children = [];
	late String departmentName = '';
	late String id = '';
	late String pid = '';

	Map<String, dynamic> toJson() => $BasicDepartmentEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
